package com.yanqu.xiuxian.config.elementalbonds;

import com.yanqu.xiuxian.config.annotations.ConfigFieldAnnotation;
import com.yanqu.xiuxian.config.annotations.ConfigFileAnnotation;
import com.yanqu.xiuxian.config.utils.excel.StringUtils;
import com.yanqu.xiuxian.utils.date.DateHelper;

import java.util.List;
//夺魁卡片表
@ConfigFileAnnotation(fileName = "ElementalBondsCard")
public class ElementalBondsCardConfig {
    @ConfigFieldAnnotation(filedName = "id")
    private int cardId;
    private int quality;
    private long price;
    @ConfigFieldAnnotation(filedName = "param", parseMethod = "parseParam")
    private String cardParam;
    @ConfigFieldAnnotation(filedName = "coldtime")
    private int cd;
    private int itemId;
    @ConfigFieldAnnotation(filedName = "maxtime", parseMethod = "parseMaxtime")
    private long maxTime;
    private int special;

    private List<Integer> cardParamList;

    public int getCardId() {
        return cardId;
    }

    public void setCardId(int cardId) {
        this.cardId = cardId;
    }

    public int getQuality() {
        return quality;
    }

    public void setQuality(int quality) {
        this.quality = quality;
    }

    public long getPrice() {
        return price;
    }

    public void setPrice(long price) {
        this.price = price;
    }

    public String getCardParam() {
        return cardParam;
    }

    public void setCardParam(String cardParam) {
        this.cardParam = cardParam;
    }

    public int getCd() {
        return cd;
    }

    public void setCd(int cd) {
        this.cd = cd;
    }

    public int getItemId() {
        return itemId;
    }

    public void setItemId(int itemId) {
        this.itemId = itemId;
    }

    public long getMaxTime() {
        return maxTime;
    }

    public void setMaxTime(long maxTime) {
        this.maxTime = maxTime;
    }

    public List<Integer> getCardParamList() {
        return cardParamList;
    }

    public void setCardParamList(List<Integer> cardParamList) {
        this.cardParamList = cardParamList;
    }

    public void parseParam(String param) {
        this.cardParamList = StringUtils.stringToIntegerList(param, "\\|");
    }

    public void parseMaxtime(String maxtime) {
        this.maxTime = StringUtils.parseLong(maxtime) * DateHelper.SECOND_MILLIONS;
    }

    public int getSpecial() {
        return special;
    }

    public void setSpecial(int special) {
        this.special = special;
    }
}
